<?php
if (isset($_GET['json'])) {
    echo '{ "a": "1", "b": "2" }';
} elseif (isset($_POST['loadTest'])) {
    echo 'load test succeed';
} elseif (isset($_GET['script'])) {
    echo 'document.getElementById("scriptTest").innerHTML = ' .
        '"script test OK, ajaxlib:" + ajaxlib;';
} elseif (count($_GET) > 0) {
    echo "get method test\n";
    print_r($_GET);
} elseif (count($_POST) > 0) {
    echo "post method test\n";
    print_r($_POST);
} else {
    echo 'blank test';
}
?>
